100 FOR i = 0 TO 10
200 PRINT "i = " i
300 ON i GOSUB pr1%, pr2%, pr3%
400 NEXT
500 GOTO myend
1000 PROC pr1%
1100 PRINT "first"
1200 RETURN
2000 PROC pr2%
2100 PRINT "second"
2200 RETURN
3000 PROC pr3%
3100 PRINT "third"
3200 RETURN
60000 PROC myend
60010 PRINT "Fini!"
60020 END
list
run
